<div class="primary">
    <div class="main-content">
        <div class="main-content-left">
            <div class="breadcrumb">
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/"><span itemprop="title">Trang chủ</span></a>
            		<span class="arrow"><img src="<?=$path_images_page?>navRow.png" alt="bredcrumb arrow"/></span>
            	</span>
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/<?=removeTitle($news['cat_name'])?>.htm"><span itemprop="title"><?=$news['cat_name']?></span></a>
            		<span class="arrow"><img src="<?=$path_images_page?>navRow.png" alt="bredcrumb arrow"/></span>
            	</span>
                <span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=generate_detail_url($news)?>"><span itemprop="title"><?=$news['new_title']?></span></a>
            	</span>
                <span class="breadcrumb_date"><?=getDateTime('','1','1','0','',time()+5*3600)?></span>
            </div>
            <div class="detail-box-news">
                <div class="detail-box-news-detail">
                    <h1 class="title"><?=$news['new_title']?></h1>
                    <p class="date"><meta content="<?=date('Y-m-d',$news['new_date'])?>" itemprop="datePublished"><?=getDateTime('','1','1','1','',$news['new_date']+5*3600)?> - Nguồn <?=$url_parse['host']?></p>
                    
                    <?=($news['new_teaser'] !='')?"<h3 class='summary'>".$news['new_teaser']."</h3>":""?>
                    <div class="show-detail-box-news">
                        <?=$news['new_detail']?>
                    </div>
                    <div class="social_wrap">
		                <ul>
		                    <li><div class="fb-like" data-href="<?=DOMAIN.$_SERVER['REQUEST_URI']?>" data-width="450" data-layout="button_count" data-show-faces="false" data-send="false"></div></li>
		                    <li><div class="g-plusone" data-size="medium" data-annotation="inline" data-width="300" data-href="http://<?=DOMAIN.$_SERVER['REQUEST_URI']?>"></div></li>
		                </ul>
		                <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
		                  {lang: 'vi'}
		                </script>
		                
		            </div>
                </div>
                <p style="font-size: 11px; font-style: italic; color: #888">Phiên bản cache tại địa chỉ: <?=$url_news?></p>
                <div class="detail-box-news-tags">
                    <h3>Tags: </h3>
                    <?php
                    $arr_tags = explode(',',$news['new_tags']);
                    $count = count($arr_tags);
                    foreach($arr_tags as $key=>$tags) {
                        if($tags != '' && $key <= ($count -1)) {
                            if($key === ($count -2)){
                            ?>
                            <a href="<?=generate_tags_url($tags)?>"><?=$tags?></a>
                            <?
                            }else{
                            ?>
                            <a href="<?=generate_tags_url($tags)?>"><?=$tags?>,</a>
                            <?
                            }
                        }
                    }
                    ?>
                </div>
                <div id="comments" class="comments">
                    <div class="comments_tab">
                        <h3>Bình luận cho tin tức này</h3>
                        <a class="send_comments btn btn-small" href="javascript: void()" onclick="loadpopup_comments();">Bình luận</a>
                    </div>
                    <div class="comments_main">
                        <?php if($list_comments):?>
                        <ul>
                        <?php
                        foreach($list_comments as $comment) {
                            //Session like và dislike
                            if(isset($_SESSION[$_SERVER['REMOTE_ADDR'].$comment['com_id']])) {
                                $lsec = 1;
                            }else {
                                $lsec = 2;
                            }
                            ?>
                            <li data-like="<?=$lsec?>" data-remote="<?=$_SERVER['REMOTE_ADDR'].$comment['com_id']?>" data-id="<?=$comment['com_id']?>">
                                <h4><span><?=$comment['com_name']?>:</span> <?=$comment['com_title']?></h4>
                                <h5><?=$comment['com_content']?></h5>
                                <p>
                                    <span class="comments_dislike" onclick="comments_dislike(this);"><i class="icon-thumbs-down"></i> <?=$comment['com_dislike']?></span>
                                    <span class="comments_like" onclick="comments_like(this);"><i class="icon-thumbs-up"></i> <?=$comment['com_like']?></span>
                                    <span class="comments_time">Gửi lúc <?=date('H:i - d/m/Y',$comment['com_date'])?></span>
                                </p>
                            </li>
                            <?
                        }
                        ?>
                        </ul>
                        <?php
                        if(count($list_comments > 5)) {
                            ?>
                            <a class="next_comment" href="#comments" onclick="next_comment(this);" data-id="<?=$iNews?>" data-page="2">Trang sau</a>
                            <?
                        }
                        ?>
                        <?php else:?>
                            <p>Chưa có bình luận nào</p>
                        <?php endif;?>
                    </div>
                </div>
                <div class="detail-box-news-interested">
                    <h3>Có thể bạn quan tâm</h3>
                    <ul>
                    <?php
                    foreach($list_hot as $news_hot) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_hot)?>">
                            <div class="img">
                                <img src="<?=$news_hot['new_picture']?>" alt="<?=$news_hot['new_title']?>"/>
                            </div>
                            <h2><?=$news_hot['new_title']?></h2>
                        </a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
                <div class="detail-box-news-new">
                    <h3>Tin mới cập nhật</h3>
                    <ul>
                    <?php
                    foreach($list_new as $news_new) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_new)?>"><h2><?=$news_new['new_title']?></h2></a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
            </div><!-- End detail-box-news -->
            <div class="detail-box-sub">
                <div class="detail-box-sub-relate">
                    <h3>Tin liên quan</h3>
                    <ul>
                    <?php
                    $relate = news_relate($news,3);
                    for($i = 0; $i < 10; $i++) {
                        if(isset($relate[$i])) {
                            ?>
                            <li><a href="<?=generate_detail_url($relate[$i]);?>">
                                <span>
                                    <img alt="<?=$relate[$i]['new_title']?>" src="<?=$relate[$i]['new_picture']?>" />
                                </span>
                                <h2><?=$relate[$i]['new_title']?></h2>
                            </a></li>
                            <?
                        }
                    }
                    ?>
                    </ul>
                </div>
                <div class="detail-box-sub-relate">
                    <h3>Đọc nhiều</h3>
                    <ul>
                    <?php
                    foreach($list_view as $news_view) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_view)?>">
                            <span>
                                <img src="<?=$news_view['new_picture']?>" alt="<?=$news_view['new_title']?>"/>
                            </span>
                            <h2><?=$news_view['new_title']?></h2>
                        </a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
                <div class="detail-box-sub-relate">
                    <h3>Cùng chuyên mục</h3>
                    <ul>
                    <?php
                    foreach($list_new as $news_view) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_view)?>">
                            <span>
                            <img src="<?=$news_view['new_picture']?>" alt="<?=$news_view['new_title']?>"/>
                            </span>
                            <h2><?=$news_view['new_title']?></h2>
                        </a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
                <div class="detail-box-sub-relate">
                    <h3>Tin cùng ngày</h3>
                    <ul>
                    <?php
                    foreach($news_date as $news_view) {
                        ?>
                        <li><a href="<?=generate_detail_url($news_view)?>">
                            <span>
                                <img src="<?=$news_view['new_picture']?>" alt="<?=$news_view['new_title']?>"/>
                            </span>
                            <h2><?=$news_view['new_title']?></h2>
                        </a></li>
                        <?
                    }
                    ?>
                    </ul>
                </div>
            </div><!-- End detail-box-sub -->
        </div><!-- End main-content-left -->
        <div class="main-content-right">
            <img alt="quang cao" src="../themes/img/adv2.jpg" />
        </div><!-- End main-content-right -->
    </div><!-- End main-content -->
</div><!-- End primary -->